package com.m3958.firstgwt.client.place;

import com.m3958.firstgwt.client.MyPlace;
import com.m3958.firstgwt.client.types.ViewNameEnum;

public class UserEditPlace extends MyPlace{
	
	private String groupId;
	
	private String userId;
	
	public UserEditPlace(String groupAndUserId){
		String[] ss = groupAndUserId.split(",");
		groupId = ss[0];
		if(ss.length > 1)userId = ss[1];
	}
	
	public UserEditPlace(String groupId,String userId){
		this.groupId = groupId;
		this.userId = userId;
	}

	@Override
	public String getToken() {
		return ViewNameEnum.USER_EDIT.toString().toLowerCase() + "/" + groupId + "," + userId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public String getGroupId() {
		return groupId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserId() {
		return userId;
	}

}
